import { toSuccess, useEntityManager } from "@sker/core"
import { AutoDevice } from "@sker/entities"
import { FindOptionsWhere } from "typeorm"


export default async () => {
    const where: FindOptionsWhere<AutoDevice> = {};
    const list = await useEntityManager(async m => {
        return await m.find(AutoDevice, { where })
    })
    return toSuccess(list, list.length)
}
